package classesdemo;

/**
 * Created by pc on 2015/2/2.
 * 生成随机字符*
 */
public class RandomChar {
    public static void main(String args[]) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < 4; i++) {
            short tmp = (short) (Math.random() * 26 + 96);
//            char temp = (char) Math.random() * 26 + 96;
//            cArray[i] = (char) Math.random() * 26 + 96;
//            char tmp = (short) (Math.random() * 26 + 96);
            sb.append((char)tmp);
        }

        System.out.println(sb.toString());

    }

}
